import Mock from '../mock-class.js'

const users = [
	{
		id: 1,
		username: 'zhoushun',
		realname: '周帅',
		phone: '137****9011',
		email: '2436******@qq.com',
		role: {
			id: 1,
			title: '超级管理员'
		},
		department: {
			id: 4,
			name: '管理部',
		},
		createTime: '2022-04-10 12:25:36'
	},
	{
		id: 2,
		username: 'zhangsan',
		realname: '张三',
		phone: '137****9012',
		email: '2430******@qq.com',
		role: {
			id: 2,
			title: '后端开发者'
		},
		department: {
			id: 1,
			name: '技术部',
		},
		createTime: '2022-04-10 12:25:36'
	},
	{
		id: 3,
		username: 'lisi',
		realname: '李四',
		phone: '137****9013',
		email: '2431******@qq.com',
		role: {
			id: 3,
			title: '前端开发者'
		},
		department: {
			id: 1,
			name: '技术部',
		},
		createTime: '2022-04-10 12:25:36'
	},
	{
		id: 4,
		username: 'wangwu',
		realname: '王五',
		phone: '137****9014',
		email: '2432******@qq.com',
		role: {
			id: 4,
			title: 'APP开发者'
		},
		department: {
			id: 1,
			name: '技术部',
		},
		createTime: '2022-04-10 12:25:36'
	},
	{
		id: 5,
		username: 'zhaoliu',
		realname: '赵六',
		phone: '137****9016',
		email: '2434******@qq.com',
		role: {
			id: 5,
			title: '客服专员'
		},
		department: {
			id: 1,
			name: '技术部',
		},
		createTime: '2022-04-10 12:25:36'
	},
]

Mock.mock(Mock.baseURL + '/user/list', 'get', function (options) {
	// console.log(options)
	return {
		code: 200,
		data: {
			list: users,
			total: 5
		},
		message: ''
	}
})